home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 July / EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso / earkit / browser / webplug_1.4 / install / install_webplug next >
Text File  |  1998-05-24  |  12KB  |  509 lines

  1. ;Install script for WebPlug version 1.4 © 1998 Esteve Boix
  2. ;This install script is © Bo Liljegren (bosse@algonet.se)
  3. ;Updated 04/98 Esteve Boix (again :)
  4. ;
  5.  
  6. (complete 0)
  7.  
  8. ;Pure sequrity. If the Installer, by some strange reason,
  9. ; can't find the default language, it will use english
  10. ; Actually, I've removed the other languages :P
  11.  
  12. (set default_lang 2)
  13.  
  14. ;=============================================================================
  15. ; English strings
  16.  
  17. ;(if (= @language "english")
  18. ;(
  19. (set default_lang 2)
  20.  
  21. (set #low-user-level
  22. (cat "\nWebPlug installation requires at least the \"Average\" user level.\n\n"
  23.      "Restart installation and select appropriate user level."
  24. ))
  25.  
  26. (set #ask-upgrade
  27. (cat "\nIs this a new installation or\n"
  28.      "an upgrade?\n\n"
  29.      "A reinstallation is equal an upgrade"
  30. ))
  31.  
  32. (set #upgr-choice-upgr
  33. (cat "An upgrade"
  34. ))
  35.  
  36. (set #upgr-choice-new
  37. (cat "New installation"
  38. ))
  39.  
  40. (set #which-oldfile
  41. (cat "Where is the program webPlug?\n(The program, NOT the directory webPlug)\n"
  42. ))
  43.  
  44. (set #mess-oldinstaller1
  45. (cat "\nYou are using an old version\nof the Installer program. (%ld.%ld)\n\n"
  46. ))
  47.  
  48. (set #mess-oldinstaller2
  49. (cat "Please use the Installer v43.3"
  50. ))
  51.  
  52. (set #mess-obsoletekick
  53. (cat "webPlug requires AmigaDOS version 3.0 or higher\nPrevious versions are no longer supported..."
  54. ))
  55.  
  56. (set #mess-nomui
  57. (cat "\nwebPlug requires MUI.\nNo muimaster.library is found.\n\n"
  58.      "Sorry, can not continue the installation"
  59. ))
  60.  
  61. (set #mess-oldmui
  62. (cat "\nwebPlug requires MUI version 3.8 or higher.\n\n"
  63.      "That means muimaster.library ver 19.35\n"
  64.      "You have version %ld.%ld\n\n"
  65.      "Sorry, can not continue the installation"
  66. ))
  67.  
  68. (set #which-directory
  69. (cat "Where do you want to install webPlug ?\n(A drawer named \"webPlug\" WILL be created)"
  70. ))
  71.  
  72. (set #confirm-adddocs
  73. (cat "\n\nWould you like to install the (HTML) documentation?"
  74. ))
  75.  
  76. (set #confirm-custom-dirs
  77. (cat "\n\nWould you like to install the CustomTags and CustomStrings directories?"
  78. ))
  79.  
  80. (set #which-language
  81. (cat "\nWhich languages should be installed?\n(english is built-in)"
  82. ))
  83.  
  84. (set #prompt-makemaindir
  85. (cat "Going to create webPlug's dir"
  86. ))
  87.  
  88. (set #prompt-copybrowserlinks
  89. (cat "Going to copy the BrowserLinks dir"
  90. ))
  91.  
  92. (set #prompt-copyplugins
  93. (cat "Going to copy the plugins dir"
  94. ))
  95.  
  96. (set #prompt-adddocs
  97. (cat "Going to copy the (HTML) documentation"
  98. ))
  99.  
  100. (set #prompt-texteditor
  101. (cat "About to install the Texteditor.mcc"
  102. ))
  103.  
  104. (set #prompt-betterstring
  105. (cat "About to install the BetterString.mcc"
  106. ))
  107.  
  108. (set #prompt-popcolor
  109. (cat "About to install the PopColor.mcc"
  110. ))
  111.  
  112. (set #prompt-customtags
  113. (cat "About to install the CustomTags directory"
  114. ))
  115.  
  116. (set #prompt-customstrings
  117. (cat "About to install the CustomStrings directory"
  118. ))
  119.  
  120. (set #prompt-copytoolicons
  121. (cat "About to copy the toolbar image files"
  122. ))
  123.  
  124. (set #prompt-executable
  125. (cat "Going to copy webPlug's executable"
  126. ))
  127.  
  128. (set #mess-congra
  129. (cat "\nCongratulations, webPlug is now installed.\n\n"
  130. ))
  131.  
  132. (set #mess-docsfound
  133. (cat "The documentation is in html format and\n"
  134.      "can be found in the directory \"%s\"\n"
  135.      "Please used your favorite browser to read it.\n"
  136.      "Start with the document \"webPlug.html\"\n\n"
  137. ))
  138.  
  139. (set #mess-shareware
  140. (cat "webPlug is released as Shareware.\n"
  141.      "The fee is only $10, so please consider\n"
  142.      "registering it if you use it.\n\n"
  143.      "Enjoy!"
  144. ))
  145.  
  146. ;))
  147.  
  148. ;=============================================================================
  149. ; procedure to copy the language catalogs
  150.  
  151. (procedure P_InstLocale
  152. (
  153.     (set n 0)
  154.     (while (set #language (select n "català"
  155.                 "english"
  156.                 "español"
  157. ;                "italiano"
  158. ;                "português"
  159.                 "svenska"
  160. ;                "norsk"
  161. ;                "deutsch"
  162.                 ""
  163.    ))
  164.     (
  165.    (if (IN #locales n)
  166.    (
  167.    ;; The english language is built in. No need to install it
  168.       (if (<> 1 n)
  169.       (
  170.           (copyfiles
  171.          (source (tackon "/bin/locale/catalogs/" #language))
  172.          (dest (tackon "LOCALE:Catalogs" #language))
  173.          (all)
  174.    )))))
  175.    (set n (+ n 1))
  176. ))))
  177.  
  178. ;========================================================
  179. ; check user-level
  180.  
  181. (if (< @user-level 1)
  182.     (abort (#low-user-level @app-name))
  183. )
  184.  
  185. ;========================================================
  186. ; variable setup
  187.  
  188. (set #installver (/ @installer-version 65536))
  189. (set #installrev (- @installer-version (* #installver 65536)))
  190. (set #tempversion (getversion))
  191. (set #osversion (/ #tempversion 65536))
  192. (set #osrevision (- #tempversion (* #osversion 65536)))
  193. (set #adddocs 0)
  194. (set #frominstdir (pathonly @icon))
  195. (set #frominstdir (substr #frominstdir 0 (- (strlen #frominstdir) (strlen "/install"))))
  196.  
  197. ;========================================================
  198. ; check installer version
  199.  
  200. (if (< #installver 43)
  201.     (
  202.      (abort (#mess-oldinstaller1 #installver #installrev)
  203.              #mess-oldinstaller2)
  204. ))
  205.  
  206. ;========================================================
  207. ; check kickstart version
  208.  
  209. (if (< #osversion 37)
  210.     (
  211.      (abort #mess-obsoletekick)
  212. ))
  213.  
  214. ;========================================================
  215. ; Display picture
  216.  
  217. (if (> (exists ("c:multiview")) 0) (set #mv "c:") )
  218. (if (> (exists ("sys:utilities/multiview")) 0) (set #mv "sys:Utilities") )
  219. (if (> (exists ("sys:tools/multiview")) 0) (set #mv "sys:Tools") )
  220.  
  221. (if (<> #mv 0)
  222.     ((run (cat "run " (tackon #mv "multiview ") "/docs/pics/webPlugS.gif"))))
  223.  
  224.  
  225. ;========================================================
  226. ; check mui (MUI 3.8 = muimaster.library V19.35)
  227.  
  228. (if (= (exists "LIBS:muimaster.library" (noreq)) 1)
  229.     (
  230.      (set #tempver (getversion "LIBS:muimaster.library"))
  231.      (set #muiver (/ #tempver 65536))
  232.      (set #muirev (- #tempver (* #muiver 65536)))
  233.      (if (< #muiver 19)
  234.     (
  235.      (abort (#mess-oldmui #muiver #muirev))
  236.      )))
  237.   ((abort #mess-nomui))
  238. )
  239.  
  240. ;=============================================================================
  241. ; ask new install or upgrade
  242.  
  243. (set #b-upgrade
  244.    (askbool
  245.       (prompt #ask-upgrade)
  246.       (help @askbool-help)
  247.       (choices #upgr-choice-upgr #upgr-choice-new)
  248.    )
  249. )
  250.  
  251. ;=============================================================================
  252. ; where should webPlug be installed
  253.  
  254. (if (= (exists "Work:" (noreq)) 2)
  255.     (set #def-dest "Work:")
  256.     (set #def-dest "SYS:")
  257.     )
  258.  
  259. ;-----------------------------------------------
  260. ; if upgrade, where is the old program?
  261.  
  262. (if (= 1 #b-upgrade)
  263. (
  264.     (set #oldprogfile
  265.    (askfile
  266.        (prompt #which-oldfile)
  267.        (help @askdir-help)
  268.        (default #def-dest)
  269.    )
  270.     )
  271.     (set #directory (pathonly (#oldprogfile)))
  272.  
  273.     ;; If Docs directory exists, new documentation will be installed!
  274.     (if (= (exists (tackon #directory "Docs") (noreq)) 2)
  275.    (set #adddocs 1)
  276.     )
  277. )
  278.  
  279. ;-----------------------------------------------
  280. ; else new install
  281.  
  282. ((set #directory
  283.    (askdir
  284.        (prompt #which-directory)
  285.        (help @askdir-help)
  286.        (default #def-dest)
  287. ))))
  288. (complete 10)
  289.  
  290. ;=============================================================================
  291. ; should documentation be installed?
  292.  
  293. (if (OR (= #adddocs 0) (= @user-level 2))
  294. (
  295.     (set #adddocs
  296.    (askbool
  297.        (prompt #confirm-adddocs)
  298.        (help @askbool-help)
  299.        (default 1)
  300.     ))
  301. ))
  302. (complete 20)
  303.  
  304. ;=============================================================================
  305. ; should CustomTags and CustomStrins directories be installed?
  306.  
  307. (
  308.    (set #addcustom
  309.    (askbool
  310.        (prompt #confirm-custom-dirs)
  311.        (help @askbool-help)
  312.        (default 1)
  313.     ))
  314. )
  315. (complete 20)
  316.  
  317. ;=============================================================================
  318. ; which languages should be installed?
  319.  
  320. (set #locales
  321.    (askoptions
  322.       (prompt #which-language)
  323.       (help @askoptions-help)
  324.       (choices
  325.                       "Català"
  326.                       "English"
  327.                       "Español"
  328. ;                      "Italiano (not complete)"
  329. ;                      "Português (not complete)"
  330.                      "Svenska"
  331. ;                      "Norsk (not complete)"
  332. ;                      "Deutsch (not complete)"
  333.                  )
  334.       (default default_lang)
  335.    )
  336. )
  337. (complete 30)
  338.  
  339. ;=============================================================================
  340. ; if new installation create the main directory
  341.  
  342. (if (= 0 #b-upgrade)
  343. (
  344.    (set @default-dest (tackon #directory "webPlug"))
  345.    (makedir
  346.     (@default-dest)
  347.     (prompt #prompt-makemaindir)
  348.     (help @makedir-help)
  349.     (infos)
  350.    )
  351.    (complete 40)
  352.  
  353. ;-----------------------------------------------
  354. ; and copying icon file for main program/directory
  355.  
  356.    (copyfiles
  357.     (source (cat #frominstdir ".info"))
  358.     (dest (tackon @default-dest '/'))
  359.     (newname 'webPlug.info' )
  360.     (infos)
  361.     (help @copyfiles-help)
  362.    )
  363. )
  364. ;-----------------------------------------------
  365. ; else just set @default-dest
  366.  
  367.     (set @default-dest #directory)
  368. )
  369. (complete 50)
  370.  
  371. ;=============================================================================
  372. ; copy the BrowserLinks directory
  373.  
  374. (copyfiles
  375.    (source "/bin/BrowserLinks")
  376.    (dest (tackon @default-dest "BrowserLinks"))
  377.    (prompt #prompt-copybrowserlinks)
  378.    (all)
  379.    (help @copyfiles-help)
  380. )
  381. (complete 60)
  382.  
  383. ;=============================================================================
  384. ; copy the "toolicons" directory
  385.  
  386. (copyfiles
  387.    (source "/bin/toolicons")
  388.    (dest (tackon @default-dest "toolicons"))
  389.    (prompt #prompt-copytoolicons)
  390.    (all)
  391.    (help @copyfiles-help)
  392. )
  393. (complete 65)
  394.  
  395. ;=============================================================================
  396. ; copy the (HTML) documentation
  397. (set #docs-dest (tackon @default-dest "Docs"))
  398.  
  399. (if (= 1 #adddocs)
  400.    (copyfiles
  401.       (source "/docs")
  402.       (dest #docs-dest)
  403.       (prompt #prompt-adddocs)
  404.       (help @copyfiles-help)
  405.       (all) 
  406.    )
  407. )
  408. (complete 70)
  409. ;=============================================================================
  410. ; copy the CustomTags and CustomStrins directories
  411. (set #docs-dest (tackon @default-dest "Docs"))
  412.  
  413. (if (= 1 #adddocs)
  414.   (
  415.    (copyfiles
  416.       (source "/bin/CustomStrings")
  417.       (dest (tackon @default-dest "CustomStrings"))
  418.       (prompt #prompt-customstrings)
  419.       (all)
  420.       (infos)
  421.       (help @copyfiles-help)
  422.    )
  423.    (copyfiles
  424.       (source "/bin/CustomTags")
  425.       (dest (tackon @default-dest "CustomTags"))
  426.       (prompt #prompt-customstags)
  427.       (all)
  428.       (infos)
  429.       (help @copyfiles-help)
  430.    )
  431.   )
  432. )
  433. (complete 75)
  434. ;=============================================================================
  435. ; install the PopColor.mcc progdir:mui/
  436.  
  437. (copylib
  438.     (source "/bin/mui/popcolor.mcc")
  439.     (dest (tackon @default-dest "mui"))
  440.     (prompt #prompt-popcolor)
  441. )
  442.  
  443. ;=============================================================================
  444. ; install the Texteditor.mcc MUI:Libs/mui/
  445.  
  446. (copylib
  447.     (source "/bin/mui/texteditor.mcc")
  448.     (dest "mui:libs/mui")
  449.     (prompt #prompt-texteditor)
  450. )
  451.  
  452. ;=============================================================================
  453. ; install the BetterString.mcc MUI:Libs/mui/
  454.  
  455. (copylib
  456.     (source "/bin/mui/betterstring.mcc")
  457.     (dest "mui:libs/mui")
  458.     (prompt #prompt-betterstring)
  459. )
  460.  
  461. (complete 85)
  462.  
  463. ;=============================================================================
  464. ; install executable files for webPlug
  465.  
  466. (copyfiles
  467.    (source "/bin/webPlug")
  468.    (dest @default-dest)
  469.    (prompt #prompt-executable)
  470.    (help @copyfiles-help)
  471.    (infos)
  472. )
  473. (complete 90)
  474.  
  475. ;=============================================================================
  476. ; install sample plugins for webPlug
  477.  
  478. (copyfiles
  479.    (source "/bin/webplugins")
  480.    (dest (tackon @default-dest "webplugins"))
  481.    (prompt #prompt-plugins)
  482.    (help @copyfiles-help)
  483.    (infos)
  484.    (all)
  485. )
  486. (complete 95)
  487.  
  488. ;=============================================================================
  489. ; procedure to copy the language catalogs
  490.  
  491. (P_InstLocale)
  492.  
  493. ;=============================================================================
  494. ;Close the mlutiview window
  495.  
  496. (rexx "quit_multiview.rexx")
  497.  
  498. (complete 100)
  499.  
  500. ;=============================================================================
  501. ; That's it!
  502.  
  503. (if (= 1 #adddocs)
  504.    (set #exit-text (cat #mess-congra (#mess-docsfound #docs-dest) #mess-shareware))
  505.    (set #exit-text (cat #mess-congra #mess-shareware) )
  506. )
  507.  
  508. (exit (#exit-text) )
  509.